import cv2 as cv
import numpy as np

img = cv.imread('../resources/miku.jpg')

colormap = [
    cv.COLORMAP_AUTUMN,
    cv.COLORMAP_BONE,
    cv.COLORMAP_JET,
    cv.COLORMAP_WINTER,
    cv.COLORMAP_RAINBOW,
    cv.COLORMAP_OCEAN,
    cv.COLORMAP_SUMMER,
    cv.COLORMAP_SPRING,
    cv.COLORMAP_COOL,
    cv.COLORMAP_PINK,
    cv.COLORMAP_HSV,
    cv.COLORMAP_HOT,
    cv.COLORMAP_PARULA,
    cv.COLORMAP_MAGMA,
    cv.COLORMAP_INFERNO,
    cv.COLORMAP_PLASMA,
    cv.COLORMAP_VIRIDIS,
    cv.COLORMAP_CIVIDIS,
    cv.COLORMAP_TWILIGHT,
    cv.COLORMAP_TWILIGHT_SHIFTED
]

index = 0

while True:
    c = cv.waitKey(300)

    dst = cv.applyColorMap(img, colormap[index % len(colormap)])
    index += 1

    cv.imshow('img', dst)

    if c == ord('q'):
        break